﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Protegidos/Administracao/GENTE_Adm.master" AutoEventWireup="true" CodeFile="acFornTipoServProd.aspx.cs" Inherits="Protegidos_Administracao_Cadastros_acFornTipoServProd" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content2" ContentPlaceHolderID="cphSubConteudo" Runat="Server">

<table width="99%" align="center">
    <tr>
        <td>
              
            <div class="Titulo01">Tipos de Serviços / Produtos</div>
            <div class="Titulo02">Cadastros / Gerais / Fornecedores</div>

        </td>    
    </tr>
    <tr>
        <td>
            
            <table width="99%" align="right">
                <tr>
                    <td>
                        <div class="SuTituloVR">Cadastro</div>
                    </td>
                </tr>
                <tr>
                    <td>
                        
                        <!-- INICIO - GRID -->
                        <telerik:RadGrid ID="rGrid" runat="server" Skin="Telerik" 
                            GridLines="None" AllowPaging="True" AllowSorting="True" Width="100%" 
                            AutoGenerateColumns="False" ShowStatusBar="True" 
                            OnPreRender="rGrid_PreRender"
                            OnNeedDataSource="rGrid_NeedDataSource"
                            ondeletecommand="rGrid_DeleteCommand" 
                            oninsertcommand="rGrid_InsertCommand" 
                            onupdatecommand="rGrid_UpdateCommand"
                            PageSize="20"  >
                            <HeaderContextMenu Skin="WebBlue">
                                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                            </HeaderContextMenu>
                            
                            <MasterTableView GridLines="None" Width="100%" CommandItemDisplay="Top" 
                                DataKeyNames="IdTipoServicoProduto" Font-Bold="False" 
                                Font-Italic="False" Font-Overline="False" Font-Strikeout="False" 
                                Font-Underline="False" Name="TableView">                
                                <Columns>
                                    <telerik:GridBoundColumn UniqueName="IdTipoServicoProduto" HeaderText="Código" DataField="IdTipoServicoProduto" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="100px"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="Descricao" HeaderText="Descrição" DataField="Descricao" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="Categoria" HeaderText="Categoria" DataField="CategoriaServicoProduto.Descricao" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" EditText="Editar" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="60px"></telerik:GridEditCommandColumn>
                                    <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Remover" CommandName="Delete" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="60px"></telerik:GridButtonColumn>
                                </Columns>
                                <SortExpressions>
                                    <telerik:GridSortExpression FieldName="Descricao" />
                                </SortExpressions>
                                <EditFormSettings EditFormType="Template">
                                    <FormTemplate>
                                        <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="1" rules="none" style="BORDER-COLLAPSE: collapse">
                                            <tr class="EditFormHeader" align="left">
                                                <td colspan="2"><b>&nbsp;&nbsp;Dados do Tipo de Serviço / Produto</b></td>
                                            </tr>
                                            <tr align="left">
                                                <td>
                                                    
                                                    <table id="Table3" cellspacing="1" cellpadding="1" width="100%" border="0">
                                                        <tr>
                                                            <td width="200"></td>
                                                            <td></td>
                                                        </tr>
                                                        <tr>
                                                            <td width="200">&nbsp;&nbsp;Descrição:</td>
                                                            <td><asp:TextBox ID="txtDescricao" runat="server" Width="300px" Text='<%# Bind( "Descricao" ) %>'></asp:TextBox></td>
                                                        </tr>
		                                                <tr>
			                                                <td width="200">&nbsp;&nbsp;Categoria:</td>
			                                                <td>
			                                                    <telerik:RadComboBox ID="rcbCategoria" runat="server" Skin="Telerik" Width="300px" DataSource='<%# (CarregaCategoria()) %>' DataValueField="IdCategoriaServicoProduto" DataTextField="Descricao">
                                                                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                                                </telerik:RadComboBox>
			                                                </td>
		                                                </tr>
                                                    </table>
                                                    
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right" colspan="2">
                                                    <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Inserir" : "Atualizar" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button>&nbsp;
                                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>
                                                </td>
                                            </tr>
                                        </table>
                                    </FormTemplate>
                                </EditFormSettings>
                                
                                <PagerStyle NextPageText="Próximo" PrevPageText="Anterior" />
                                <CommandItemSettings AddNewRecordText=" Adicionar Categoria" RefreshText=" Atualizar" />
                            </MasterTableView>
                            <FilterMenu Skin="WebBlue">
                                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                            </FilterMenu>
                            <StatusBarSettings LoadingText="Aguarde..." ReadyText="Pronto" />
                        </telerik:RadGrid>
                        <!-- FIM - GRID -->
                        
                    </td>
                </tr>
            </table>
            
        </td>    
    </tr>
    
    <tr runat="server" id="trResultado">
        <td>
            
            <table width="99%" align="right">
                <tr>
                    <td>
                        <div class="SuTituloVR">Resultado da Pesquisa</div>
                    </td>
                </tr>
                <tr>
                    <td>
                        
                        <%--RadGrid--%>
                        
                    </td>
                </tr>
                
            </table>
            
        </td>    
    </tr>
    
</table>

</asp:Content>

